package seatechit.msbgateway.dbaccess.facade;

import seatechit.msbgateway.dbaccess.dao.DAOFactory;
import seatechit.msbgateway.dbaccess.entity.TransactionParam;

public class TransactionParamFacade extends BusinessBaseFacade {
	DAOFactory factory;

	public TransactionParamFacade() {
		super();
		factory = new DAOFactory();
	}

	@SuppressWarnings("unchecked")
	public TransactionParam getTransactionParamByTranCode(String tranCode) throws Exception {
		Object obj = new TransactionParam();
		try {
			// transaction.begin();
			obj = factory.getTranParamDAO().getTransactionParamByTranCode(tranCode);
			// transaction.commit();
		} catch (Exception exception) {
			// transaction.rollback();
			throw exception;
		}
		return (TransactionParam) obj;

	}

	@SuppressWarnings("unchecked")
	public String getTransactionSequence() throws Exception {
		try {
			// transaction.begin();
			return factory.getTranParamDAO().getTransactionSequence();
			// transaction.commit();
		} catch (Exception exception) {
			// transaction.rollback();
			throw exception;
		}
	}
}
